In analytic number theory, the Brun–Titchmarsh theorem, named after Viggo Brun and Edward Charles Titchmarsh, is an upper bound on the distribution of prime numbers in arithmetic progression. It states that, if counts the number of primes p congruent to a modulo q with p ≤ x, then
for all q < x. The result is proved by sieve methods. By contrast, Dirichlet's theorem on arithmetic progressions gives an asymptotic result, which may be expressed in the form
but this can only be proved to hold for the more restricted range q < (log x)c for constant c: this is the Siegel–Walfisz theorem.